<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		
	</head>
	<body>
	</body>
	<script type="text/javascript" src="js/jquery-1.10.1.js"></script>
	<script type="text/javascript">
		var arr = [1,2,3,4,5,6,7,8,9,10];
		for(var i = 0;i<arr.length;i++){
console.log(i)
			if(i == (arr.length - 1)){
				console.log(i)
				
				console.log("最后一位了")    
			} 
			  
		}
		
		function getnewArr (arr,len) {
			var newarr = [];
			for(var i = 0;i<arr.length;i+=len){
				newarr.push(arr.slice(i,i+len))
			}
			return newarr  
		}
		var newarr = getnewArr(arr,4)
	</script>
</html>
